﻿namespace EmbeddedSensorCloud.Plugin.MicroERP
{
    public interface IErpDataService
    {
        string CreateCustomer(string customerModel);

        /// <summary>
        /// Retrieves a single customer model from the database.
        /// </summary>
        /// <exception cref="MySqlException" />
        /// <exception cref="CompanyNotFoundException" />
        /// <exception cref="BadRequestException" />
        string GetCustomer(string customerId);

        string FindCustomers(string searchText, string customerType);

        void UpdateCostumer(string customerModel, string customerId);

        void DeleteCustomer(string customerId);

        string CreateInvoice(string invoiceModel);

        string GetInvoice(string invoiceId);

        string FindInvoices(string customerSearchText, string minDate, string maxDate, string minPrice, string maxPrice);

        void UpdateInvoice(string invoiceModel, string invoiceId);

        void DeleteInvoice(string invoiceId);

        byte[] CreateInvoiceReport(string invoiceId);
    }
}
